package com.xbenben.project.wxpush.service.impl;

import com.xbenben.project.wxpush.entity.SystomLog;
import com.xbenben.project.wxpush.mapper.SystomLogDAO;
import com.xbenben.project.wxpush.service.SystomLosService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author yu.zhijia
 * Date:2023/6/16 17:13
 **/
@Service
@Slf4j
public class SystomLosServiceImpl implements SystomLosService {


    @Autowired
    private SystomLogDAO SystomLogDAO;

    @Override
    public void saveSyztomLog(String req, String content, String content2) {

        SystomLog systomLog = new SystomLog();
        systomLog.setLogContent(content);
        systomLog.setReq(req);
        systomLog.setEventType(content2);
        systomLog.setCreateTime(new Date());
        systomLog.setUpdateTime(new Date());
        SystomLogDAO.insert(systomLog);

    }
}
